﻿
namespace sinetd.Services
{
    /// <summary>
    /// Provides functionality required by sinetd.Server from all services.
    /// </summary>
    public interface IService : IManagerElement
    {
        /// <summary>
        /// Occurs when sinetd.Server handle a new connection.
        /// </summary>
        /// <param name="conn">A new connection.</param>
        void HandleNewConnection(IConnectionIO conn);
        /// <summary>
        /// Closes the instance which implement sinetd.Services.IService and releases all associated resources.
        /// </summary>
        void Shutdown();
    }
}
